﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Windows;
using System.Windows.Controls;
using System.Windows.Data;
using System.Windows.Documents;
using System.Windows.Input;
using System.Windows.Media;
using System.Windows.Media.Imaging;
using System.Windows.Navigation;
using System.Windows.Shapes;
using Big2.Big2Game;

namespace Big2.Big2WfpGui
{
    /// <summary>
    /// Interaction logic for Options.xaml
    /// </summary>
    public partial class Options : UserControl
    {
        public Options()
        {
            InitializeComponent();
            getRules();
        }

        public Rules getRules()
        {
            string player = PlayerOption.SelectionBoxItem.ToString();
            string Bet = BetOption.SelectionBoxItem.ToString();
            string Time = TimerOption.SelectionBoxItem.ToString();
            string Game = GamesOption.SelectionBoxItem.ToString();

            //parse
            int PlayerAmount = int.Parse(player[0].ToString());
            int BetAmount = int.Parse(Bet[0].ToString() + Bet[1].ToString());
            int GameAmount = int.Parse(Game[0].ToString() + Game[1].ToString());
            int TimeAmount = int.Parse(Time[0].ToString() + Time[1].ToString());
            
            Rules r = new Rules(PlayerAmount, BetAmount, GameAmount, TimeAmount);

            return r;
        }//Rules getRules()

    }
}
